package com.cjj.service.impl;

import com.cjj.service.ClassifyService;
import com.cjj.vo.ClassifyVo;
import com.cjj.vo.ConfirmationClassificationVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.guigu.mapper.*;
import com.guigu.pojo.*;
import com.guigu.viwe.PageVo;
import com.lc.vo.ExaminView;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ClassifyServiceImpl implements ClassifyService {

    @Resource
    private TInterposeClassifyMapper tInterposeClassifyMapper;

    @Resource
    private TDiseaseLibraryMapper tDiseaseLibraryMapper;

    @Resource
    private THealthmgrMapper tHealthmgrMapper;

    @Resource
    private TInterposeSchemeMapper tInterposeSchemeMapper;

    @Resource
    private TExaminationMapper tExaminationMapper;


    //分页查询人群分类
    @Override
    public PageInfo<ClassifyVo> queryClassify(PageVo<ClassifyVo> pageVo) {
        PageHelper.startPage(pageVo.getCurrentPage(), pageVo.getPageSize());
        PageInfo<ClassifyVo> ClassifyPageInfo = new PageInfo<>(this.tInterposeClassifyMapper.queryClassify(pageVo.getCondition()));
        return ClassifyPageInfo;
    }

    @Override
    public List<TDiseaseLibrary> queryDisease() {

        return this.tDiseaseLibraryMapper.queryDisease();
    }

    //查询所有医生
    @Override
    public List<THealthmgr> querydoctor() {
        return this.tHealthmgrMapper.querydoctor();
    }

    //确认分类
    @Override
    public int notarizeClassify(TInterposeClassify tInterposeClassify) {

        return this.tInterposeClassifyMapper.notarizeClassify(tInterposeClassify);
    }

    @Override
    public int addTInterposeScheme(TInterposeScheme tInterposeScheme) {

        return this.tInterposeSchemeMapper.insertSelective(tInterposeScheme);
    }

    @Override
    public List<TExamination> queryImage(String id) {

        return this.tExaminationMapper.queryImage(id);
    }

    //查询分类基本信息
    @Override
    public ConfirmationClassificationVo queryClassification(String fileNumber) {
        return this.tInterposeClassifyMapper.queryClassification(fileNumber);
    }
}
